package com.aixin.csopuser.domain.dto;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.Instant;
import java.time.LocalDate;

@Data
@NoArgsConstructor
public class SupplierCustomerDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    private String chanel;
    private String customerID;
    private String customerName;
    private Integer gender;
    private String identity;
    private String phoneNumber;
    private String policyNumber;
    private String serviceName;
    private Long usedCount;
    private Instant dueTime;

    private String equityID;
    private String equityLevelID;
    private String serviceID;
    private LocalDate lastUseDate;
    private Integer custStatus;

    public SupplierCustomerDTO(String chanel,
                               String customerID,
                               String customerName,
                               Integer gender,
                               String identity,
                               String phoneNumber,
                               String policyNumber,
                               String serviceName,
                               Long usedCount,
                               String equityID,
                               String equityLevelID,
                               String serviceID,
                               Instant dueTime,
                               LocalDate lastUseDate,
                               Integer custStatus) {
        this.chanel = chanel;
        this.customerID = customerID;
        this.customerName = customerName;
        this.gender = gender;
        this.identity = identity;
        this.phoneNumber = phoneNumber;
        this.policyNumber = policyNumber;
        this.serviceName = serviceName;
        if (usedCount == null) {
            this.usedCount = 0L;
        } else {
            this.usedCount = usedCount;
        }
        this.equityID = equityID;
        this.equityLevelID = equityLevelID;
        this.serviceID = serviceID;
        this.dueTime = dueTime;
        this.lastUseDate = lastUseDate;
        this.custStatus = custStatus;
    }
}
